//ICS 314 - Sundial Project
//Yosetime Group
//Spring 2013

import static org.junit.Assert.*;
import org.junit.Test;

/**
 * JUnit Test for Sundial
 * 
 * @author Kyle Berney
 *
 */
public class SundialTest {
	private Sundial sundial;
	private double angle = 0.;
	
	@Test
	/**
	 * Checks that the angle of the displayed line is within .5 degrees of the desired angle to be displayed
	 */
	public void testGetPos() {
		sundial = new Sundial();
		double error = 0.;
		for (angle = 0.; angle < 360.; angle += 0.1){
			sundial.setAngle(angle);
			error = sundial.getPos();
			assertTrue(error <= .5);
		}		
	}

}
